package com.dog.basics.dao.mtkj;

import com.dog.basics.bean.model.mtkj.MtDeviceOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dog.basics.bean.vo.admin.mtkj.StatisticsVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 设备订单 Mapper 接口
 * </p>
 *
 * @author wph
 * @since 2020-09-29
 */
public interface MtDeviceOrderMapper extends BaseMapper<MtDeviceOrder> {
    /**
     * @Description: 查询个人消费总金额
     * @Param:
     * @return:
     * @Author: wph
     * @Date: 2020/10/15 0015
     */
    BigDecimal getUserMoney(@Param("userId")Long userId);
    /**
     * @Description: 查询金额
     * @Param:
     * @return:
     * @Author: wph
     * @Date: 2020/10/15 0015
     */
    BigDecimal getMoney(@Param("userId")Long userId,@Param("startTime")Long startTime, @Param("endTime")Long endTime,@Param("wheeType")Integer wheeType);
    /**
     * @Description: 查询总使用时长
     * @Param:
     * @return:
     * @Author: wph
     * @Date: 2020/10/15 0015
     */
    Integer getSumUserTime(@Param("deviceId")Long deviceId);
    /**
     * @Description: 查询月使用时长
     * @Param:
     * @return:
     * @Author: wph
     * @Date: 2020/10/15 0015
     */
    Integer getSumUserMonthTime(@Param("deviceId")Long deviceId,@Param("startTime") Long startTime,@Param("endTime") Long endTime);

    /**
     * @功能描述:  设备订单总数量
     * @author He
     * @date 2020/11/2
     */
    Integer getOrderCount(@Param("agentUserId")Long agentUserId,@Param("startTime")Long startTime, @Param("endTime")Long endTime,@Param("wheeType")Integer wheeType);


}
